<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>调入申请</title>
		<!--  专属于弹出层 layer的css样式  -->
		<link rel="stylesheet" type="text/css" href="../../../resource/css/admin_css/list_style.css"/>
		<link rel="stylesheet" type="text/css" href="../../../resource/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="../../../resource/css/niubility.css"/>
		<script type="text/javascript" src="../../../resource/layui/layui.js"></script>
		<link rel="stylesheet" type="text/css" href="../../../resource/css/bootstrap.css"/>
	</head>
	<body>
		<!--详情：弹出层-->
		<div class="popUp" id="popUp">
			<table class="table table-bordered table-hover"></table>
			<table class="table table-bordered table-hover"></table>
			<table class="table table-bordered table-hover"></table>
		</div>

		<div class="bs">
			<input type="button" id="totalSelection" value="全部选中" />
			<input type="button" id="sure" value="审核" />
		</div>

		<table class="layui-table">
			<!-- 数据的改变区域 -->
			<tbody id="infoBox"></tbody>
			<!--用来分页的div-->
			<div class="fenBox">
				<div id="pagination1"></div>
			</div>
		</table>

		<script type="text/javascript" src="../../../resource/js/jquery.min.js"></script>
		<!--***************所有的静态路径****************-->
		<script src="../../../resource/js/static_url.js"></script>
		<!-- 共同一套：生成信息列表 + 弹出层退回去的代码 -->
		<script src="../../../resource/js/admin_js/admin_review_list.js"></script>
		<!--  购买 、 调入 、调出 、 报损报废的审核函数  -->
		<script src="../../../resource/js/admin_js/admin_review_four.js"></script>
		<script>
			//（1）渲染列表
            myAjax_list_popup(admin_diaoru,'1');
            //（2）审核
            $("#sure").click(function(){
                //参数为： 批量审核post的那种
                examine(admin_diaoru_review,admin_diaoru);
                $("#totalSelection").val("全部选中");
                flag = 1;
            });

			//（3）详情
           function details(that){
               //发送Ajax请求 ，接受数据成功之后，拼接字符串
               //拿出一个id ,点击第几个，我就拿第几条数据中一个id
               var ids = $(that).attr("data-id");
               $.ajax({
                   url: admin_diaoru_details+ids,
                   type:"GET",
                   async: true,
                   dataType:"json",
                   success: function(info){
                       if(info.code != 0){
                           layui.use('layer', function(){
                               var layer = layui.layer;
                               layer.msg(info.msg, {skin:'tip_position',time:'3000'});
                           });
                           return;
                       }
                       var obj1 = info.data;
                       var str1 = "";
                       str1+=
                           '<tr>'+
						       '<td>设备类别</td>'+
							   '<td>设备编号</td>'+
							   '<td>设备名称</td>'+
							   '<td>当前设备状态</td>'+
							   '<td>当前使用人</td>'+
							   '<td>使用人编号</td>'+
							   '<td>存放地点</td>'+
							   '<td>用户类别</td>'+
							   '<td>所属研究室</td>'+
                           '</tr>'+
                           '<tr>'+
							   '<td>'+obj1.equipmentCategory+'</td>'+
							   '<td>'+obj1.equipmentNo+'</td>'+
							   '<td>'+obj1.equipmentName+'</td>'+
							   '<td>'+obj1.useStatus+'</td>'+
							   '<td>'+obj1.userName+'</td>'+
							   '<td>'+obj1.userNo+'</td>'+
						       '<td>'+obj1.place+'</td>'+
						       '<td>'+obj1.userCategory+'</td>'+
						       '<td>'+obj1.teacherOffice+'</td>'+
                           '</tr>';
                       var str2 ="";
                       str2+=
                           '<tr>'+
							   '<td>单价</td>'+
							   '<td>型号</td>'+
						       '<td>规格</td>'+
                               '<td>出货票号码</td>'+
							   '<td>折旧状态</td>'+
							   '<td>折旧年限</td>'+
						       '<td>供货单位</td>'+
                              '<td>购买日期</td>'+
                              '<td>用途</td>'+
                           '</tr>'+
                           '<tr>'+
							   '<td>'+obj1.price+'</td>'+
							   '<td>'+obj1.type+'</td>'+
							   '<td>'+obj1.guiGe+'</td>'+
							   '<td>'+obj1.shippingNo+'</td>'+
							   '<td>'+obj1.depreciationStatus+'</td>'+
							   '<td>'+obj1.depreciationPeriod+'</td>'+
                               '<td>'+obj1.deliveryUnit+'</td>'+
                               '<td>'+obj1.application+'</td>'+
                           '</tr>';
                       var str3 = "";
                       str3+=
                           '<tr>'+
							   '<td>出产厂家</td>'+
							   '<td>制造号</td>'+
							   '<td>备注</td>'+
							   '<td>调拨日期</td>'+
							   '<td>调拨原因</td>'+
							   '<td>调出单位</td>'+
							   '<td>调入单位</td>'+
                           '</tr>'+
                           '<tr>'+
							   '<td>'+obj1.manufacturer+'</td>'+
							   '<td>'+obj1.manufacturerNo+'</td>'+
							   '<td>'+obj1.remark+'</td>'+
							   '<td>'+obj1.transerDate+'</td>'+
							   '<td>'+obj1.transerReason+'</td>'+
							   '<td>'+obj1.transerOutUnit+'</td>'+
                              '<td>'+obj1.transerInUnit+'</td>'+
                           '</tr>';
                       $("#popUp table").eq(0).html(str1);
                       $("#popUp table").eq(1).html(str2);
                       $("#popUp table").eq(2).html(str3);
                       //让内容以弹出层的方式显示出来。
                       $("#popUp").attr({"class":"popUpClick"});
                       // 动态计算 #popUp 的宽度
                       var width_fen = parseInt( $("#popUp").css("width") );
                       width_fen = 801;
                       $("#popUp")[0].style.marginLeft = -width_fen/2-120-60+'px';
                   },
                   error:function(){
                       layui.use('layer', function(){
                           var layer = layui.layer;
                           layer.msg('系统错误！！！', {skin:'tip_position',time:'3000'});
                       });
                   }
               }); //ajax结束
		   }
		</script>
	</body>
</html>
